<?php

namespace app\api\Controller;

use think\Controller;

class Common extends Controller
{

    protected function initialize()
    {
        parent::initialize();

        header('Access-Control-Allow-Origin: *');
        header("Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type,token, Accept");
        header('Access-Control-Allow-Methods: POST,GET');
        if (request()->isOptions()) {
            exit();
        }
    }    
}
